<template>
  <div class="hello">
    <compTable
      :tableHeader="tableHeader"
      :tableData="list"
      @sort-events="handleSort"
      @filter-events="filterHandler"
      @click-events="handleClick"
    />
  </div>
</template>

<script>
import gencodehttp from "@/api/gencode";
import compTable from "@/components/compTable";

export default {
  name: "gencode",
  components: { compTable },
  data() {
    return {
      listpames: {
        page: 1,
        limit: 20
      },
      list: [],
      tableHeader: [
        // 表头信息，可根据minWidth修改宽度
        { prop: "engine", label: "字段类型", minWidth: "160px" },
        {
          prop: "createTime",
          label: "创建时间",
          minWidth: "75px"
        },
        {
          prop: "tableComment",
          label: "表格备注",
          minWidth: "75px"
        },
        {
          prop: "tableName",
          label: "表格名称",
          minWidth: "75px"
        }
      ]
    };
  },
  created() {
    gencodehttp.getListAPI(this.listpames).then(res => {
      console.log(res);
      this.list = res.data.data;
    });
  },
  methods: {}
};
</script>
